<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>
        编辑个人资料
</title><meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/validator.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
</head>
<body>
    <form name="theForm" method="post" action="login_changedpass.do?type=update" onsubmit="javascript:return WebForm_OnSubmit();" id="theForm" enctype="multipart/form-data">
	<input type="hidden" name="id" id="id" value="<s:property value="model.id"/>" />
<script type="text/javascript">
//<![CDATA[
function WebForm_OnSubmit() {
	return formvalidator("all");
}
function formvalidator(obj)
{
	var controlId = "all";
	 if (typeof(obj) != "string" )
	 {
		 controlId = obj.id;
	 }
	if(controlId=="all" || controlId=="password")
	{
		if(Utils.trim(document.getElementById("password").value)=="")
		{
			document.getElementById("CompareValidator2").style.visibility="visible";
			return false;
		}
		else
		{
			document.getElementById("CompareValidator2").style.visibility="hidden";
		}
	}
	if(controlId=="all" || controlId=="newpassword")
	{
		if(Utils.trim(document.getElementById("newpassword").value)=="")
		{
			document.getElementById("CompareValidator3").style.visibility="visible";
			return false;
		}
		else
		{
			document.getElementById("CompareValidator3").style.visibility="hidden";
		}
	}
	if(controlId=="all" || controlId=="newpassword1")
	{
		if(Utils.trim(document.getElementById("newpassword").value)!=Utils.trim(document.getElementById("newpassword1").value))
		{
			document.getElementById("CompareValidator1").style.visibility="visible";
			return false;
		}
		else
		{
			document.getElementById("CompareValidator1").style.visibility="hidden";
		}
	}
	
	return true;
}
//]]>
</script>

<div>

</div>
    <h1>
        <span class="action-span1"><a href="" target="_blank">
            首页</a> </span><span id="search_id" class="action-span1">-
                编辑个人资料
            </span>
        <div style="clear: both">
        </div>
    </h1>
    <div class="main-div">
        <table width="100%">
            <tbody>
            	<tr id="jmn">
            		<td align="center" colspan="2"><SPAN style="color:Red;"><s:property value="msg"/></SPAN></td>
            	</tr>
                <tr id="jmn">
	<td class="label">
                        <a href="javascript:showNotice('passwordNotic');" title="点击此处查看提示信息">
                            <img src="img/notice.gif" width="16" height="16" border="0" alt="点击此处查看提示信息"></a>旧密码
                    </td>
	<td>
                        <input name="password" type="password" id="password" onblur="formvalidator(this)"/><span
                            class="require-field">*</span>&nbsp;
                        <span id="CompareValidator2" style="color:Red;visibility:hidden;">不能为空</span><br />
                        <span class="notice-span" style="display: block;" id="passwordNotic">如果要修改密码,请先填写旧密码.</span>
                    </td>
</tr>

                <tr>
                    <td class="label">
                        密码
                    </td>
                    <td>
                        <input name="newpassword" type="password" maxlength="32" id="newpassword" onblur="formvalidator(this)"/><span
                            class="require-field">*</span>&nbsp;
                            <span id="CompareValidator3" style="color:Red;visibility:hidden;">不能为空</span>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        确认密码
                    </td>
                    <td>
                        <input name="newpassword1" type="password" maxlength="32" id="newpassword1" onblur="formvalidator(this)"/><span
                            class="require-field">*</span>&nbsp;
                        <span id="CompareValidator1" style="color:Red;visibility:hidden;">两次密码不同</span>
                    </td>
                </tr>
                
                
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value=" 确定 " class="button" />
                        &nbsp;&nbsp;&nbsp;
                        <input type="reset" value=" 重置 " class="button" />
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <!--Bottom开始-->
    
<div id="footer">
<br />
<s:property value="bottom"/></div>
    <!--Bottom结束-->
</form>
</body>
</html>
